<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>商品销售统计列表页- ${web.name}${web.additionalTitle!}</title>
<script src="${sysResRoot}/jquery.js" type="text/javascript"></script>
<link href="${root}/u/css/main.css" type="text/css" rel="stylesheet" />
<link href="${root}/u/css/memeber.css" type="text/css" rel="stylesheet" />
<link href="${sysResRoot}/front.css" rel="stylesheet" type="text/css"/>
<link href="${base}/res/common/css/jquery.ui.css" rel="stylesheet" type="text/css"/>
<script src="${base}/res/common/js/jquery.js" type="text/javascript"></script>
<script src="${base}/thirdparty/fckeditor/fckeditor.js" type="text/javascript"></script>
<script type="text/javascript">
function g(o){
	return document.getElementById(o);
}
</script>
</head>
<body>
[#include "../include/shop_top.html"/]
<div class="w1168">
	[#include "店铺中心_导航.html"/]
	<div class="user_right">
		<div class="user_title2">销售统计管理</div>
        <div class="clear10"></div> 
		<form id="tableForm" action="${base}/sell/list.jspx" method="post">
		
        <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#cccccc">
		<tr>
			<td width="40" height="30" align="center" bgcolor="#f0f0f0">ID</td>
		  <td align="center" bgcolor="#f0f0f0">商品名称</td>
		  <td width="100" align="center" bgcolor="#f0f0f0">类别</td>
		  <td width="100" align="center" bgcolor="#f0f0f0">类型</td>
		  <td width="80" align="center" bgcolor="#f0f0f0">销售价</td>
		  <td width="80" align="center" bgcolor="#f0f0f0">库存</td>
		  <td width="80" align="center" bgcolor="#f0f0f0">销量</td>
			<td width="80" align="center" bgcolor="#f0f0f0">操作选项</td>
		</tr>
  		</table>
        [#if pagination.list?size gt 0]
		<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1">
		[#list pagination.list as c]
		<tr>	
			<td width="40" height="65" align="center" bgcolor="#FFFFFF">${c.id}</td>
			<td bgcolor="#FFFFFF" style="padding-left:10px; padding-right:10px;">
			   <img src="${base!}${c.productExt.coverImg!}" width="50" height="50" class="fl"/>
			   <a href="${c.url!}" target="_self" style="color:#333; text-decoration:none; float:left; margin-top:5px; margin-left:5px;">
			   [@text_cut s=c.name len='15' append='...'/]
               </a>
			</td>
			<td width="100" align="center" bgcolor="#FFFFFF">${c.category.name}</td>
			<td width="100" align="center" bgcolor="#FFFFFF">${c.type.name}</td>
			<td width="80" align="center" bgcolor="#FFFFFF">${c.salePrice}</td>
			<td width="80" align="center" bgcolor="#FFFFFF">${c.stockCount}</td>
			<td width="80" align="center" bgcolor="#FFFFFF">${c.saleCount}</td>
			<td width="80" align="center" bgcolor="#FFFFFF">
		<a href="view.jspx?id=${c.id}" style="color:#005fa2;">查看详情</a>
        </td>
		</tr>
        <tr>
        <td height="1" colspan="8" bgcolor="#e7e7e7"></td>
        </tr>
		[/#list]
  </table>
<div class="clear10"></div>
        <input type="hidden" name="pageNo" value="${pageNo}"/>
		<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td height="50" align="center" class="pn-sp" style="font-size:12px;">
			共 ${pagination.totalCount} 条 
			每页 ${pagination.pageSize} 条 
			<input type="button" value="首 页" onclick="_gotoPage('1');"[#if pagination.firstPage] disabled="disabled"[/#if]/>
			<input type="button" value="上一页" onclick="_gotoPage('${pagination.prePage}');"[#if pagination.firstPage] disabled="disabled"[/#if]/>
			<input type="button" value="下一页" onclick="_gotoPage('${pagination.nextPage}');"[#if pagination.lastPage] disabled="disabled"[/#if]/>
			<input type="button" value="尾 页" onclick="_gotoPage('${pagination.totalPage}');"[#if pagination.lastPage] disabled="disabled"[/#if]/> 
			当前 ${pagination.pageNo}/${pagination.totalPage} 页  转到第<input type="text" id="_goPs" style="width:50px" onfocus="this.select();" onkeypress="if(event.keyCode==13){$('#_goPage').click();return false;}"/>页
			<input id="_goPage" type="button" value="转" onclick="_gotoPage($('#_goPs').val());"[#if pagination.totalPage==1] disabled="disabled"[/#if]/>
		</td>
		</tr>
		</table>
		<script type="text/javascript">
		function _gotoPage(pageNo) {
			try{
				var tableForm = document.getElementById("tableForm");
				$("input[name=pageNo]").val(pageNo);
				tableForm.action="${base}/sell/list.jspx";
				tableForm.onsubmit=null;
				tableForm.submit();
			} catch(e) {
				alert('_gotoPage(pageNo)方法出错');
			}
		}
		</script>
		[#else]
		<div class="zwsj">暂无数据</div>
		[/#if]
      </form>
	</div>
	<div class="clear20"></div>
</div>
[#include "../include/footer_information_bar.html"/]
</body>
</html>